/**
 * This file is part of the CAKIS project.
 * 
 * Copyright (c) 2009-2010 - Florian Arndt, Christian Kerl
 * 
 * @license GNU Lesser General Public License v3 <http://www.opensource.org/licenses/lgpl-3.0.html>
 * @since   27.04.2010
 * @version SVN: $Id: ProductListRepository.java 88 2010-04-27 11:49:24Z christian-kerl@web.de $
 */
package org.cakis.server.model.repository;

import java.util.List;

import javax.ejb.Local;

import org.cakis.server.model.ProductList;

/**
 * {@link Repository} managing {@link ProductList} entities.
 *
 * @author Christian Kerl
 */
@Local
public interface ProductListRepository extends Repository<ProductList> {

    /**
     * Finds the {@link ProductList} with the given id and fetches the
     * {@link ProductList#getEntries() ProductList.Entries}.
     * 
     * @param id
     * 
     * @return
     */
    ProductList findByIdAndFetch(Long id);

    /**
     * Finds all {@link ProductList}, which are not {@link ProductList#getIsArchived() archived}.
     * The {@link ProductList#getEntries() ProductList.Entries} are not fetched.
     * 
     * @return
     */
    List<ProductList> findNonArchived();
}
